package com.ittao.taoaicodemother.exception;

import lombok.Getter;

/**
 * 错误码枚举
 */
@Getter
public enum ErrorCode {

    SUCCESS(0, "ok"),
    PARAMS_ERROR(40000, "请求参数错误"),
    NOT_LOGIN_ERROR(40100, "未登录"),
    NO_AUTH_ERROR(40101, "无权限"),
    TOO_MANY_REQUEST(42900, "请求过于频繁，请稍后再试"),
    NOT_FOUND_ERROR(40400, "请求数据不存在"),
    FORBIDDEN_ERROR(40300, "禁止访问"),
    SYSTEM_ERROR(50000, "系统内部异常"),
    OPERATION_ERROR(50001, "操作失败"),

    // VIP 相关的错误码
    DAILY_LIMIT_EXCEEDED(40111, "今日AI应用生成次数已达上限，请升级VIP解锁增至20个应用/天生成"),
    TOKEN_LIMIT_EXCEEDED(40112, "对话内容过长，请升级VIP享受64K Token大容量"),
    VIP_REQUIRED_FOR_DOWNLOAD(40113, "今日源码下载功能已达上限，请升级VIP解锁无限制下载"),
    VIP_REQUIRED_FOR_EXPORT(40114, "今日历史对话导出功能已达上限，请升级VIP解锁无限制导出历史对话"),
    VIP_EXPIRED(40115, "您的VIP会员已过期，请及时续费");

    /**
     * 状态码
     */
    private final int code;

    /**
     * 信息
     */
    private final String message;

    ErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

}
